<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta http-equiv="X-UA-Compatible" content="IE=8">
		<title>招生计划-建设高校及建设学科 </title>
		<!--<link href="../favicon.ico" rel="icon" type="image/x-icon" />-->
		<link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="../../layui/css/layui.css">
		<link rel="stylesheet" href="../../css/swiper.min.css">
		<link rel="stylesheet" href="../../css/common.css">
		<link rel="stylesheet" href="../../css/default.css">
		<link rel="stylesheet" href="../../css/style.css">

		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js?version=1.01"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js?version=1.01"></script>
    <![endif]-->

	</head>

	<body>
		<div class="top_header_wrap"></div>
		<!--#include file="../common/header.html" -->
		<!--广告-->
		<div class="banner">
			<div class="swiper-container swiper-container1">
				<div class="swiper-wrapper">
					<div class="swiper-slide"><img src="../../img/banner.jpg"></div>
					<div class="swiper-slide"><img src="../../img/banner.jpg"></div>
					<div class="swiper-slide"><img src="../../img/banner.jpg"></div>
				</div>
				<!-- Add Pagination -->
				<div class="swiper-pagination"></div>
			</div>
		</div>
		<!--内容-->
		<div class="main_container">
			<div class="layui-container">
				<div class="brumb_box">
					<a href="entrance_programs.html">招生计划</a>&gt;
					<a href="build_uni.html">“双一流”建设高校及建设学科</a>
				</div>
				<div class="table_row">
					<div class="table-responsive">
						<table class="table table_mar table_build">
							<thead>
								<tr class="build_titld">
									<th colspan="2">“双一流”建设学科</th>
								</tr>
							</thead>
							<tbody id="school_content">
								<tr>
									<td>安交通大学</td>
									<td>电子科学与技术、信息与通信工程</td>
								</tr>
								<tr>
									<td>长安科技大学</td>
									<td>数学、化学、材料科学与工程、基础医学、口腔医学、护理学</td>
								</tr>
								<tr>
									<td>长安科技大学</td>
									<td>应用经济学（自定）</td>
								</tr>
								<tr>
									<td>西安电子科技大学</td>
									<td>马克思主义理论（自定）、化学（自定）、计算机科学与技术（自定）</td>
								</tr>
								<tr>
									<td>长安科技大学</td>
									<td>应用经济学（自定）</td>
								</tr>
								<tr>
									<td>西安电子科技大学</td>
									<td>马克思主义理论（自定）、化学（自定）、计算机科学与技术（自定）</td>
								</tr>
								<tr>
									<td>长安科技大学</td>
									<td>应用经济学（自定）</td>
								</tr>
								<tr>
									<td>西安电子科技大学</td>
									<td>马克思主义理论（自定）、化学（自定）、计算机科学与技术（自定）</td>
								</tr>
							</tbody>
						</table>
						<div id="page" class="pagnition">
							<ul class="clearfix">
								<li class="before_btn"></li>
								<li>
									<a href="javascript:void(0);"><i class="before_dot">.....</i></a>
								</li>
								<li>
									<a id='currPage0' href="javascript:void(0);" class="speifyPage active">1</a>
								</li>
								<li>
									<a id='currPage' href="javascript:void(0);" class="speifyPage">2</a>
								</li>
								<li>
									<a id='currPage1' href="javascript:void(0);" class="speifyPage">3</a>
								</li>
								<li>
									<a href="javascript:void(0);"><i class="after_dot">.....</i></a>
								</li>
								<li class="after_btn">

								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--尾部-->
		<div class="footer_container">

		</div>
		</div>
	</body>
	<script type="text/javascript" src="../../js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="../../js/define.js"></script>
	<script type="text/javascript" src="../../js/swiper.min.js"></script>
	<script type="text/javascript" src="../../js/swiper.js"></script>
	<script type="text/javascript" src="../../bootstrap/js/bootstrap.min.js"></script>
	<script>
		var currPage = 1;
		var totalPage = 1;

		function getData(thisPage) {
			$.ajax({
				type: "get",
				url: "http://47.111.188.27:8080/gsgkzyl/double_classic_schools/list/" + thisPage + "/5",
				success: function(maj) {
					var data = maj.data.list;
					if(data != null && data != "" && data != "{}" && data != "[]") {
						currPage = maj.data.currPage;
						totalPage = maj.data.totalPage;
						var schoolRankHtml = '';
						for(var i = 0; i < data.length; i++) {
							schoolRankHtml += '<tr>';
							schoolRankHtml += '		<td class="td_first">' + data[i].school_name + '</td>';
							schoolRankHtml += '		<td class="td_oh"><a href="build_uni_detail.html?id=' + data[i].id + '">' + data[i].majors + '<i>&gt;&gt;</i></a></td>';
							schoolRankHtml += '	</tr>';
						}
						$('#school_content').html(schoolRankHtml);

						/*分页逻辑*/
						$('.before_dot').hide();
						$('.after_dot').hide();
						if(currPage > 2) {
							$('.before_dot').show();
						}
						if(currPage < totalPage - 2) {
							$('.after_dot').show();
						}

						$('.speifyPage').removeClass('active');
						var html = "";
						if(currPage > 1) {
							$("#currPage0").html(currPage - 1);
						} else {
							$("#currPage0").html(currPage);
							$("#currPage0").addClass("active")
							if(totalPage >= 2) {
								$("#currPage").html(currPage + 1);
							}
							if(totalPage >= 3) {
								$("#currPage1").html(currPage + 2);
							}
							return;
						}
						$("#currPage").html(currPage);
						$("#currPage").addClass("active");
						if(currPage < totalPage) {
							$("#currPage1").html(currPage + 1);
						} else {
							$('.speifyPage').removeClass('active');
							$("#currPage1").html(currPage);
							$("#currPage1").addClass("active")
							if(totalPage >= 2) {
								$("#currPage").html(currPage - 1);
							}
							if(totalPage >= 3) {
								$("#currPage0").html(currPage - 2);
							}
						}
					/*分页逻辑结束*/
					} else {
						$('#school_content').html('暂无数据');
						$('.pagnition').hide();
					}
				}
			})
		}
		$(document).ready(function() {

			$(".top_header_wrap").load("../common/header.html");
			$(".footer_container").load("../common/footer.html");

			getData(1);

			$(".before_btn").click(function() {
				if(currPage == 1)
					return;
				getData(currPage - 1);
			})
			$(".after_btn").click(function() {
				if(currPage == totalPage)
					return;
				getData(currPage + 1);
			})
			$(".speifyPage").click(function() {
				var index = $(this).html();
				getData(index);
			})

		});
	</script>

</html>